package com.gopay.checkorder.service.impl;

import java.util.List;

import javax.annotation.Resource;

import com.gopay.checkorder.service.BankOrderService;
import com.gopay.common.Result;
import com.gopay.common.constants.bank.BankConstants;
import com.gopay.common.constants.bank.BisBankBusinessProd;
import com.gopay.common.constants.bank.BisBankInterfaceChannel;
import com.gopay.common.constants.proccode.ProcCodeConstants;
import com.gopay.common.domain.bank.BankOrder;
import com.gopay.common.domain.bank.BaseMessage;
import com.gopay.common.domain.bank.bobj.ebank.BobjB2cMessage;
import com.gopay.common.domain.bank.dayend.BaseDayendEntry;
import com.gopay.common.domain.cps.vo.CheckOrderResult;
import com.gopay.remote.bank.BankInteractRemoteService;
/**
 * @CheckOrderBobjB2cImpl.java
 * @author LiLiLi
 */
public class CheckOrderBobjB2cImpl implements BankOrderService  {

	@Resource(name = "bankClient")
	private BankInteractRemoteService bankClient;

	@Override
	public CheckOrderResult checkOrder(BankOrder bankOrder, String target) {
		CheckOrderResult checkOrderResult = new CheckOrderResult();
		checkOrderResult.setSuccess(false);
		checkOrderResult.setOrderId(bankOrder.getOrderId());
		
	    BobjB2cMessage base = new BobjB2cMessage();
		base.setBank(BankConstants.BANK_LOGO_BOBJ);
		base.setOrderNum(bankOrder.getOutOrderId());
		base.setOrderId(bankOrder.getOrderId());
		base.setBankOrderId(bankOrder.getOutOrderId());
		base.setBank(BankConstants.BANK_LOGO_BOBJ);
		base.setBankIntrChann(BisBankInterfaceChannel.get(bankOrder.getInterfaceChennelCode()));
		base.setBankBusProd(BisBankBusinessProd.get(bankOrder.getBankBizProdCode()));
	    bankClient.query(base);
	    checkOrderResult.setErrCode(ProcCodeConstants.PROC_CODE_100E5112);
	    checkOrderResult.setErrMsg("等待银行异步通知，点击查询按钮查看结果");
	    return checkOrderResult;

	}

	@Override
	public BankOrder getDbOrder() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public BaseMessage dayend(String bank_bus) {
		// TODO Auto-generated method stub
		return null;
	}


	@Override
	public List<CheckOrderResult> checkDayend(String bank_bus) {
		// TODO Auto-generated method stub
		return null;
	}


	@Override
	public Result getDayendMsg(String string) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public CheckOrderResult checkDayendOrder(BaseDayendEntry bdm, BankOrder bo) {
		// TODO Auto-generated method stub
		return null;
	}

}